/**
 * Created by CZ on 2017/5/4.
 */
module.exports = function ($compile) {
    return {
        restrict: 'A',
        scope:false,
        link: function(scope, element, attrs) {
            scope.$watch(function() {
                    return scope.$eval(attrs.bindHtmlCompile);
                },
                function(value) {
                    element.html(value);
                    $compile(element.contents())(scope);
                });
        }
    }
};